package com.zrq.jwtdemo.core.result;

import com.zrq.jwtdemo.core.constant.Constant;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

/**
 * @Author:
 * @CreateDate: 2020/12/3
 * @Version: 类说明：
 */
@Data
@Builder
public class APIResponse<R> {

    private Integer code;

    private R date;

    public static <R>APIResponse<R> makeSuccess(R date){
        return APIResponse.<R>builder()
                .code(Constant.SUCCESS_CODE)
                .date(date)
                .build();
    }
    @Tolerate
    public APIResponse() {
    }
}
